<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>背景图片-精确位置</title>

    <style>
        div {
            background-color: pink;
            width: 300px;
            height: 300px;
            background-image: url(../imgs/icon1.png);
            background-repeat: no-repeat;
            /* 背景图片位置坐标 x y */
            /* background-position: 20px 50px; */
            /* 如果指定一个数值那就是指定了x，y居中 */
            background-position: 30px;
        }
    </style>

</head>
<body>
    
    <div></div>

</body>
</html>